package com.ehotting.edsta.diagnosisPredict.feign;

import com.ehotting.eaf.core.web.domain.diagnosisPredict.PageDto;
import com.ehotting.eaf.core.web.domain.diagnosisPredict.Response;
import com.ehotting.edsta.diagnosisPredict.domain.dto.*;
import com.ehotting.edsta.diagnosisPredict.feign.factory.ModelManagerFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 模型管理feignClient
 */
@FeignClient(name = "modelManagerProject", url = "${request.url.prefix}/project",fallbackFactory = ModelManagerFallbackFactory.class)
public interface ModelManagerFeignService {

    /**
     * 模型查询列表
     * @param projectSearchDto
     * @return
     */
    @PostMapping(value = "/search-page")
    Response<PageDto<ProjectDto>> searchPage(@RequestBody ProjectSearchDto projectSearchDto);

    /**
     * 模型删除
     * @param idList
     * @return
     */
    @DeleteMapping(value = "/batch")
    Response<Boolean> batch(long[] idList);

    /**
     * 获取模型详情
     * @param id
     * @return
     */
    @GetMapping(value = "/{id}")
    Response<ProjectDto> get(@PathVariable("id") Long id);

    /**
     * 项目信息保存
     * @return
     */
    @PostMapping(value = "/save")
    Response<ProjectDto> projectSave(@RequestBody ProjectDto dto);

}